package com.amrit.autowiring.constructor;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainApp {
	public static void main(String[] args) {
		ApplicationContext context =
				new ClassPathXmlApplicationContext("Beans_autowireConst.xml");
		System.out.println("Going to get object of A from context");

		A obja = (A) context.getBean("a");
		System.out.println("Going to call doStuff of A");
		System.out.println(obja.getName());

		obja.doStuffA();
	}
}